<?php

declare (strict_types = 1);

namespace app\store\model\user;

use app\store\model\lottery\Lottery;
use app\common\model\user\Posts as PostsModel;
use app\store\model\User;
use think\model\relation\HasOne;


class Posts extends PostsModel
{
    protected $hidden = [
        'updated_at',
        'store_id'
    ];
    public function user():HasOne
    {
        return $this->hasOne(User::class,'user_id','user_id');
    }

    public function relationActivity():HasOne
    {
        return $this->hasOne(Lottery::class,'id','activity_id');
    }

}